home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / basic / RIBlitzLibs.lha / riblitzlibs / docs / RIGfxLib.doc < prev    next >
Encoding:
Text File  |  1995-01-28  |  7.1 KB  |  189 lines

  1. -----------------------------------------------------------------------------
  2. ====                  RI GFX Function Library V1.2 (C)1994         ====
  3. -----------------------------------------------------------------------------
  4.  
  5.                 Written By Stephen McNamara & Steven Matty
  6.                         ©1994 Leading Edge Software
  7.  
  8.  
  9. This library contains commands for the control of palette objects inside
  10. Blitz2.  These are just simple commands that allow either interrogation of
  11. the palette objects are modifications to the colour values contained in
  12. them.  After changing the palette with these commands, you'll have to do
  13. either a USE PALETTE or DISPLAYPALETTE (whichever is applicable to what
  14. you're doing) to make the changes come into effect on your screen.
  15.  
  16. Or send us anything you've written........
  17.  
  18.  
  19. Command list:
  20.       PaletteInfo palette#
  21.       r.w=PalRed (Colour#)
  22.       g.w=PalGreen (Colour#)
  23.       b.w=PalBlue (Colour#)
  24.       r.w=AGAPalRed (Colour#)
  25.       g.w=AGAPalGreen (Colour#)
  26.       b.w=AGAPalBlue (Colour#)
  27.       PalAdjust dest_palette#,ration.q[,start_col,end_col]
  28.       FillPalette palette#,r,g,b[start_col,end_col]
  29.       AGAFillPalette palette#,r,g,b[start_col,end_col]
  30.  
  31. New commands:
  32.       [suc=]CopyColour source_pal#,dest_pal#,source_col#,dest_col#
  33.       [suc=]SaveCMAP palette#,filename$
  34.       CPUCls bitmap#
  35.  
  36.  
  37. Statement: PaletteInfo
  38. ------------------------------------------------------------------------
  39. Modes : Amiga/Blitz
  40. Syntax: PaletteInfo Palette#
  41.  
  42.   This command is used to specify the palette object that all palette
  43. interrogations should look at.  The majority of the commands use this
  44. palette object as the source for their data, e.g. PalRed(1) will look at
  45. the red value of colour 1 of the palette last used in a PaletteInfo
  46. command.
  47.  
  48.  
  49. Function: PalRed
  50. ------------------------------------------------------------------------
  51. Modes : Amiga/Blitz
  52. Syntax: r.w=PalRed (Colour#)
  53.  
  54.   This command is used to get the red value of colour number Colour#.  You
  55. should use the PaletteInfo command to specify what palette this command
  56. takes its information from.
  57.   The value returned will be from 0 to 15
  58.  
  59. Function: PalGreen
  60. ------------------------------------------------------------------------
  61. Modes : Amiga/Blitz
  62. Syntax: g.w=PalGreen (Colour#)
  63.  
  64.   This command is used to get the green value of colour number Colour#.
  65. You should use the PaletteInfo command to specify what palette this command
  66. takes its information from.
  67.   The value returned will be from 0 to 15
  68.  
  69. Function: PalBlue
  70. ------------------------------------------------------------------------
  71. Modes : Amiga/Blitz
  72. Syntax: b.w=PalBlue (Colour#)
  73.  
  74.   This command is used to get the blue value of colour number Colour#.  You
  75. should use the PaletteInfo command to specify what palette this command
  76. takes its information from.
  77.   The value returned will be from 0 to 15
  78.  
  79. Function: AGAPalRed
  80. ------------------------------------------------------------------------
  81. Modes : Amiga/Blitz
  82. Syntax: r.w=AGAPalRed (Colour#)
  83.  
  84.   This command is used to get the red value of colour number Colour#.  You
  85. should use the PaletteInfo command to specify what palette this command
  86. takes its information from.
  87.   The value returned will be from 0 to 255, this number of shades, though,
  88. can only be displayed on an AGA machine.
  89.  
  90. Function: AGAPalGreen
  91. ------------------------------------------------------------------------
  92. Modes : Amiga/Blitz
  93. Syntax: g.w=AGAPalGreen (Colour#)
  94.  
  95.   This command is used to get the green value of colour number Colour#.
  96. You should use the PaletteInfo command to specify what palette this command
  97. takes its information from.
  98.   The value returned will be from 0 to 255, this number of shades, though,
  99. can only be displayed on an AGA machine.
  100.  
  101. Function: AGAPalBlue
  102. ------------------------------------------------------------------------
  103. Modes : Amiga/Blitz
  104. Syntax: b.w=AGAPalBlue (Colour#)
  105.  
  106.   This command is used to get the blue value of colour number Colour#.  You
  107. should use the PaletteInfo command to specify what palette this command
  108. takes its information from.
  109.   The value returned will be from 0 to 255, this number of shades, though,
  110. can only be displayed on an AGA machine.
  111.  
  112.  
  113. Statement: PalAdjust
  114. ------------------------------------------------------------------------
  115. Modes : Amiga/Blitz
  116. Syntax: PalAdjust dest_palette#,ration.q[,start_col,end_col]
  117.  
  118.   This command is used to multiple all the colours, or a range of colours,
  119. in a palette object, by a ratio.  The dest_palette# arguement is used to
  120. give a destination for the adjusted colour information.  This destination
  121. should be a pre-reserved palette and should be AT LEAST as big and the
  122. source palette.  The source palette is taken as being the palette last used
  123. in the PaletteInfo command.
  124.   The ratio should be given as either a quick value or a float and should
  125. be below one for a fade or above to lighten a palette.  If you give a ratio
  126. of 1 then a palette copy will occur.
  127.   The optional start and end parameters let you specify the range of
  128. colours to adjust.  Only this range of colours, though, will be adjusted
  129. and stored in the destination palette.
  130.  
  131.  
  132. Statement: FillPalette
  133. ------------------------------------------------------------------------
  134. Modes : Amiga/Blitz
  135. Syntax: FillPalette palette#,r,g,b[start_col,end_col]
  136.  
  137.   This command lets you fill a given palette object with specific r,g,b
  138. values.  The values given should be between 0 to and 15.  Optionally, you
  139. can give start and end colour numbers to set a range for the fill.  You
  140. should be careful, though, because when you specify a range, no checking is
  141. done (at the moment) to make sure that you don't exceed the colour limit of
  142. the palette.
  143.   You should note that this command does not work on the palette last
  144. PaletteInfo'ed.
  145.  
  146.  
  147. Statement: AGAFillPalette
  148. ------------------------------------------------------------------------
  149. Modes : Amiga/Blitz
  150. Syntax: AGAFillPalette palette#,r,g,b[start_col,end_col]
  151.  
  152.   This command is identical to FillPalette except that it lets you specify
  153. AGA shade values for the r,g,b parameters.
  154.   See FillPalette for more information.
  155.  
  156.  
  157. Statement/Function: CopyColour
  158. ------------------------------------------------------------------------
  159. Modes : Amiga/Blitz
  160. Syntax: [suc=]CopyColour source_pal#,dest_pal#,source_col#,dest_col#
  161.  
  162.   This will attempt to copy a colour entry in a palette to another entry,
  163. which can be in a separate palette or the same.  If used as a function,
  164. then it will return -1 for success, or 0 for failure.  The command fails if
  165. either of the colour numbers is out of the range of the relevant palette.
  166.  
  167.  
  168. Statement/Function: SaveCMAP
  169. ------------------------------------------------------------------------
  170. Modes : Amiga
  171. Syntax: [suc=]SaveCMAP palette#,filename$
  172.  
  173.   This command will save out the given palette as an IFF file, with just a
  174. BMHD and CMAP.  This file can be loaded into graphics packages like DPaint.
  175. It will return -1 for success in saving, or 0 for failure.
  176.  
  177.  
  178. Statement: CPUCls
  179. ------------------------------------------------------------------------
  180. Modes : Amiga/Blitz
  181. Syntax: CPUCls bitmap#
  182.  
  183.   Does a clear of a bitmap using the CPU.  This command, unlike the Acid
  184. command Cls, only clears to colour 0.  On accerelated machines, though, it
  185. out performs the Cls instruction.
  186.  
  187.  
  188. >> END
  189.